﻿using System.Web;
using GUI.Extensions;
using BO.Video;

namespace GUI.Services.Video
{
    /// <summary>
    /// Summary description for CountVideoByZone
    /// </summary>
    public class CountVideoByZone : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write(100);
            var videoZoneId = RequestExtensions.ZoneId;


            context.Response.Write(videoZoneId >= 0
                ? VideoBO.CountVideoByZone(videoZoneId) : 0);
            
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}